/***********************************************************************
 * Module:  HistoriqueAssure.java
 * Author:  a.kanwar
 * Purpose: Defines the Class HistoriqueAssure
 ***********************************************************************/

import java.util.*;


public class HistoriqueAssure {
    
   
   
   /***********************************************************************
    * Attribute
    **********************************************************************/
    
   private int idHistoContrat;
   private java.lang.String numContrat;
   private java.lang.String nom;
   private java.lang.String prenom;
   private java.util.Date dateDeNaissance;
   private java.lang.String adresse;
   private java.util.Date dateDeSouscription;
   private java.util.Date dateDeResiliation;
   private java.lang.String numPermis;
   private int codePostal;
   private java.lang.String ville;
   private java.util.Date dateDePermis;
   private java.lang.String marque;
   private java.lang.String modele;
   private java.lang.String carroserie;
   private java.lang.String boiteVitesse;
   private java.lang.String energie;
   
   
   private HistoriqueAgence historiqueAgence;
   private HistoriqueSinistre historiqueSinistre;
   private Assure assure;

    /******************************************************************
     * Constructor
     *****************************************************************/
   
    public HistoriqueAssure(int idHistoContrat, String numContrat, String nom, String prenom, Date dateDeNaissance, String adresse, Date dateDeSouscription, Date dateDeResiliation, String numPermis, int codePostal, String ville, Date dateDePermis, String marque, String modele, String carroserie, String boiteVitesse, String energie, HistoriqueAgence historiqueAgence, HistoriqueSinistre historiqueSinistre, Assure assure) {
        this.idHistoContrat = idHistoContrat;
        this.numContrat = numContrat;
        this.nom = nom;
        this.prenom = prenom;
        this.dateDeNaissance = dateDeNaissance;
        this.adresse = adresse;
        this.dateDeSouscription = dateDeSouscription;
        this.dateDeResiliation = dateDeResiliation;
        this.numPermis = numPermis;
        this.codePostal = codePostal;
        this.ville = ville;
        this.dateDePermis = dateDePermis;
        this.marque = marque;
        this.modele = modele;
        this.carroserie = carroserie;
        this.boiteVitesse = boiteVitesse;
        this.energie = energie;
        this.historiqueAgence = historiqueAgence;
        this.historiqueSinistre = historiqueSinistre;
        this.assure = assure;
    }

    public HistoriqueAssure(String numContrat, String nom, String prenom, Date dateDeNaissance, String adresse, Date dateDeSouscription, Date dateDeResiliation, String numPermis, int codePostal, String ville, Date dateDePermis, String marque, String modele, String carroserie, String boiteVitesse, String energie, HistoriqueAgence historiqueAgence, HistoriqueSinistre historiqueSinistre, Assure assure) {
        this.numContrat = numContrat;
        this.nom = nom;
        this.prenom = prenom;
        this.dateDeNaissance = dateDeNaissance;
        this.adresse = adresse;
        this.dateDeSouscription = dateDeSouscription;
        this.dateDeResiliation = dateDeResiliation;
        this.numPermis = numPermis;
        this.codePostal = codePostal;
        this.ville = ville;
        this.dateDePermis = dateDePermis;
        this.marque = marque;
        this.modele = modele;
        this.carroserie = carroserie;
        this.boiteVitesse = boiteVitesse;
        this.energie = energie;
        this.historiqueAgence = historiqueAgence;
        this.historiqueSinistre = historiqueSinistre;
        this.assure = assure;
    }

    
    
    /***************************************************************************
     * getters and setters 
     ***************************************************************************/
    
    public int getIdHistoContrat() {
        return idHistoContrat;
    }

    public void setIdHistoContrat(int idHistoContrat) {
        this.idHistoContrat = idHistoContrat;
    }

    public String getNumContrat() {
        return numContrat;
    }

    public void setNumContrat(String numContrat) {
        this.numContrat = numContrat;
    }

    public String getNom() {
        return nom;
    }

    public void setNom(String nom) {
        this.nom = nom;
    }

    public String getPrenom() {
        return prenom;
    }

    public void setPrenom(String prenom) {
        this.prenom = prenom;
    }

    public Date getDateDeNaissance() {
        return dateDeNaissance;
    }

    public void setDateDeNaissance(Date dateDeNaissance) {
        this.dateDeNaissance = dateDeNaissance;
    }

    public String getAdresse() {
        return adresse;
    }

    public void setAdresse(String adresse) {
        this.adresse = adresse;
    }

    public Date getDateDeSouscription() {
        return dateDeSouscription;
    }

    public void setDateDeSouscription(Date dateDeSouscription) {
        this.dateDeSouscription = dateDeSouscription;
    }

    public Date getDateDeResiliation() {
        return dateDeResiliation;
    }

    public void setDateDeResiliation(Date dateDeResiliation) {
        this.dateDeResiliation = dateDeResiliation;
    }

    public String getNumPermis() {
        return numPermis;
    }

    public void setNumPermis(String numPermis) {
        this.numPermis = numPermis;
    }

    public int getCodePostal() {
        return codePostal;
    }

    public void setCodePostal(int codePostal) {
        this.codePostal = codePostal;
    }

    public String getVille() {
        return ville;
    }

    public void setVille(String ville) {
        this.ville = ville;
    }

    public Date getDateDePermis() {
        return dateDePermis;
    }

    public void setDateDePermis(Date dateDePermis) {
        this.dateDePermis = dateDePermis;
    }

    public String getMarque() {
        return marque;
    }

    public void setMarque(String marque) {
        this.marque = marque;
    }

    public String getModele() {
        return modele;
    }

    public void setModele(String modele) {
        this.modele = modele;
    }

    public String getCarroserie() {
        return carroserie;
    }

    public void setCarroserie(String carroserie) {
        this.carroserie = carroserie;
    }

    public String getBoiteVitesse() {
        return boiteVitesse;
    }

    public void setBoiteVitesse(String boiteVitesse) {
        this.boiteVitesse = boiteVitesse;
    }

    public String getEnergie() {
        return energie;
    }

    public void setEnergie(String energie) {
        this.energie = energie;
    }

    public Assure getAssure() {
        return assure;
    }

    public void setAssure(Assure assure) {
        this.assure = assure;
    }

    @Override
    public String toString() {
        return "HistoriqueAssure{" + "idHistoContrat=" + idHistoContrat + ", numContrat=" + numContrat + ", nom=" + nom + ", prenom=" + prenom + ", dateDeNaissance=" + dateDeNaissance + ", adresse=" + adresse + ", dateDeSouscription=" + dateDeSouscription + ", dateDeResiliation=" + dateDeResiliation + ", numPermis=" + numPermis + ", codePostal=" + codePostal + ", ville=" + ville + ", dateDePermis=" + dateDePermis + ", marque=" + marque + ", modele=" + modele + ", carroserie=" + carroserie + ", boiteVitesse=" + boiteVitesse + ", energie=" + energie + ", historiqueAgence=" + historiqueAgence + ", historiqueSinistre=" + historiqueSinistre + ", assure=" + assure + '}';
    }

   
    
   
    
   
   
   
   
    
    
    
    
    
   /*********************************************************
    * generate code by power AMC
    *********************************************************/
    
   /** @pdGenerated default parent getter */
   public HistoriqueAgence getHistoriqueAgence() {
      return historiqueAgence;
   }
   
   /** @pdGenerated default parent setter
     * @param newHistoriqueAgence */
   public void setHistoriqueAgence(HistoriqueAgence newHistoriqueAgence) {
      if (this.historiqueAgence == null || !this.historiqueAgence.equals(newHistoriqueAgence))
      {
         if (this.historiqueAgence != null)
         {
            HistoriqueAgence oldHistoriqueAgence = this.historiqueAgence;
            this.historiqueAgence = null;
            oldHistoriqueAgence.removeHistoriqueAssure(this);
         }
         if (newHistoriqueAgence != null)
         {
            this.historiqueAgence = newHistoriqueAgence;
            this.historiqueAgence.addHistoriqueAssure(this);
         }
      }
   }
   /** @pdGenerated default parent getter */
   public HistoriqueSinistre getHistoriqueSinistre() {
      return historiqueSinistre;
   }
   
   /** @pdGenerated default parent setter
     * @param newHistoriqueSinistre */
   public void setHistoriqueSinistre(HistoriqueSinistre newHistoriqueSinistre) {
      if (this.historiqueSinistre == null || !this.historiqueSinistre.equals(newHistoriqueSinistre))
      {
         if (this.historiqueSinistre != null)
         {
            HistoriqueSinistre oldHistoriqueSinistre = this.historiqueSinistre;
            this.historiqueSinistre = null;
            oldHistoriqueSinistre.removeHistoriqueAssure(this);
         }
         if (newHistoriqueSinistre != null)
         {
            this.historiqueSinistre = newHistoriqueSinistre;
            this.historiqueSinistre.addHistoriqueAssure(this);
         }
      }
   }

}